package com.sykj.cloud.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sykj.cloud.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 系统角色菜单对象 sys_role_menus
 *
 * @author mr.will
 * @date 2021-03-23
 */
public class SysRoleMenu extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 部门ID */
    private String menuId;

    /** 角色ID */
    private String roleId;

    /** 删除人 */

    private String deleteBy;

    /** 是否删除 */

    private Integer deleted;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deleteTime;



    public SysRoleMenu() {
    }

    public SysRoleMenu(String menuId, String roleId, String deleteBy, Integer deleted, Date deleteTime) {
        this.menuId = menuId;
        this.roleId = roleId;
        this.deleteBy = deleteBy;
        this.deleted = deleted;
        this.deleteTime = deleteTime;
    }

    /**
     * 用户值传递
     * @param roleId 角色Id
     * @param deleteBy 删除者
     * @param deleteTime 删除时间
     */
    public SysRoleMenu(String roleId, String deleteBy, Date deleteTime) {
        this.roleId = roleId;
        this.deleteBy = deleteBy;
        this.deleted = 1;
        this.deleteTime = deleteTime;
    }

    public String getMenuId() {
        return menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getDeleteBy() {
        return deleteBy;
    }

    public void setDeleteBy(String deleteBy) {
        this.deleteBy = deleteBy;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Date getDeleteTime() {
        return deleteTime;
    }

    public void setDeleteTime(Date deleteTime) {
        this.deleteTime = deleteTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("menuId", getMenuId())
            .append("roleId", getRoleId())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("deleteBy", getDeleteBy())
            .append("deleted", getDeleted())
            .append("deleteTime", getDeleteTime())
            .toString();
    }
}
